CI: skip ghpages integration tests on PR builds#338
Conversation
|
Commit 2 implements skip logic in helper-ghpages.R, wires skip_ghpages_integration() on integration tests, and sets ANIMINT2_TEST_GHPAGES on push-to-master only. Fork/PR CI should skip ghpages tests now. Moved skip logic to tests/testthat/helper-ghpages.R per testthat skipping guidance. Happy to inline in test-compiler-ghpages.R if you prefer. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #338 +/- ##
==========================================
- Coverage 73.02% 72.41% -0.62%
==========================================
Files 164 164
Lines 8837 8837
==========================================
- Hits 6453 6399 -54
- Misses 2384 2438 +54
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
this is too complex. the skip logic should be: if PR from fork then rm gh-pages test file before running tests. |

This PR fixes the ghpages CI failure described in #335.
On pull request builds, especially from forks, the ghpages integration tests in
tests/testthat/test-compiler-ghpages.Rcall the GitHub API throughreset_test_repo(). Those tests need an admin token on theanimint-testorg. When that token is not available, CI fails with permission errors - even when the PR did not touch GitHub Pages.The goal is to skip those integration tests when the required CI setup is missing, instead of failing the whole build with a misleading red X.
Commit plan
ghpages_tests_should_skip()and a failing test that shows the skip gate is not implemented yet.skip_if()on integration tests, and optionally setANIMINT2_TEST_GHPAGESin the workflow for pushes tomasteronly.Local note: to run ghpages integration tests locally, you may need
ANIMINT2_TEST_GHPAGES=1and a validGITHUB_PATexported.